from machine import RTC
from machine import Timer , I2C ,Pin
import PFC8563
import network
import ntptime 
import machine,utime
rtc=RTC()
i2c = I2C(0,scl=Pin(6), sda=Pin(7), freq=400000)
PFC8563.i2c=i2c
t=rtc.datetime()
PFC8563.settimes(t[0],t[1],t[2],t[4],t[5],t[6],t[3])

while 1 :
    t=rtc.datetime()
    print(PFC8563.getdatatime(),t)
    utime.sleep(1)
# PFC8563.sync()
